#region Summary

// 
// Owner : JackieHan 
// 
// Solution : UpdateSystem
// 
// Project :Skomart.Update.Test
// 
// File : TestUpdateServerConfig.cs
// 
// CopyRight : Copyright © 2010-2011 Skomart Corporation, All Rights Reserved 
// 
// Summary : 测试服务全局配置文件读取
// 
// History : 
//			2011-01-05 16:24:08    Create 
// 

#endregion

#region Using

using System;
using System.Collections.Generic;
using NUnit.Framework;
//using Skomart.Update.Entities.Server;

#endregion

namespace Skomart.Update.Test
{
    /// <summary> 
    /// 测试服务全局配置文件读取
    /// </summary>
    [TestFixture]
    public class TestUpdateServerConfig
    {
        private string configDirctory;

        [SetUp]
        public void SetUp()
        {
            configDirctory = @"E:\Skomart\Code\UpdateSystem\Skomart.Update.Test\ConfigFiles";
        }

        [Test]
        public void TestServerConfig()
        {
            
            //var serverConfig = new UpdateServerInfo(configDirctory);
            //Assert.AreEqual(1, serverConfig.UpdateSysetms.Count);
            //var systemConfig = serverConfig["SampleSystem"];
            //Assert.AreEqual("SampleSystem", systemConfig.SystemName);
            //Assert.AreEqual(2, systemConfig.PublishLogs.Count);
        }

        [Test]
        public void TestGetNewFiles()
        {
            //var serverConfig = new UpdateServerInfo(configDirctory);
            //var newFiles = serverConfig["SampleSystem"].GetNewFiles();
            //Assert.AreEqual(3, newFiles.Count);
        }

        [TearDown]
        public void TearDown()
        {
        }
    }
}